package com.lagou.service.impl;

import com.lagou.dao.ArticleDao;
import com.lagou.domain.Article;
import com.lagou.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 李树飞
 */
@Service
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    private ArticleDao articleDao;

    /**
     * 这里是事务切入点
     * @param article
     */
    @Override
    public void saveArticle(Article article) {
        System.out.println("添加文章");
        articleDao.saveArticle(article);
        int i = 1 / 0;
    }
}
